<template>
    <div class="app-container">
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="元数据日志" name="Metadatalog">
                <div class="appRightTop">
                    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
                        <el-form-item label="元数据名">
                            <el-input v-model="queryParams.standardChName" clearable />
                        </el-form-item>
                        <el-form-item label="修改人">
                            <el-input v-model="queryParams.xiugairen" clearable />
                        </el-form-item>
                        <el-form-item label="修改时间">
                            <el-date-picker v-model="queryParams.value6" type="daterange" range-separator="至"
                                start-placeholder="开始日期" end-placeholder="结束日期">
                            </el-date-picker>
                        </el-form-item>

                        <el-form-item>
                            <el-button type="text" @click="handleQuery" class="gotoseach">搜索</el-button>
                            <span type="text" @click="resetQuery" style="
                                color: #7483a6;
                                font-size: 16px;
                                font-weight: 500;
                                cursor: pointer;
                                marginleft: 20px;
                              ">重置</span>
                        </el-form-item>
                    </el-form>
                </div>
                <div class="btnList">
                    <el-button @click="addStandar()" class="addStyle">导出</el-button>
                    <el-button @click="removeAll()" :disabled="disabledInfo">批量删除</el-button>
                </div>
                <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"
                    max-height="680" class="TableStyle">
                    <el-table-column show-overflow-tooltip type="selection" width="100" align="center" />
                    <el-table-column show-overflow-tooltip label="日志ID" prop="rizhiID" />
                    <el-table-column show-overflow-tooltip label="元数据名" prop="yuanshujuming">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip label="修改类型" prop="xiugaileixing" />
                    <el-table-column show-overflow-tooltip label="修改人" prop="xiugairen" />

                    <!-- <el-table-column show-overflow-tooltip label="维护时间"  prop="createTime" /> -->
                    <el-table-column prop="createTime" label="修改时间" width="160">
                        <template slot-scope="scope">
                            <span>{{ formatTime(scope.row.createTime) }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作" width="250">
                        <template slot-scope="scope">
                            <!-- 删除 -->
                            <el-tooltip class="item" effect="dark" content="删除" placement="top">
                                <el-button type="text" class="nolockColor" @click="handleDelete(scope.row)">
                                    删除
                                    <!-- 删除 -->
                                    <!-- <span class="iconfont">&#xe74e;</span> -->
                                </el-button>
                            </el-tooltip>
                        </template>
                    </el-table-column>
                </el-table>

                <div class="paginationBigbox">
                    <div class="paginationbox">
                        <el-pagination @size-change="handleSizeChange" :current-page.sync="queryParams.current"
                            @current-change="handleCurrentChange" :page-size="queryParams.size"
                            layout="total,prev, pager, next" background :total="pageTotal" ref="pagination">
                        </el-pagination>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="业务数据日志" name="Servicedatelog">
            <div class="appRightTop">
                <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
                    <el-form-item label="元数据名">
                        <el-input v-model="queryParams.standardChName" clearable />
                    </el-form-item>
                    <el-form-item label="修改人">
                        <el-input v-model="queryParams.xiugairen" clearable />
                    </el-form-item>
                    <el-form-item label="修改时间">
                        <el-date-picker v-model="queryParams.value6" type="daterange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
                        </el-date-picker>
                    </el-form-item>

                    <el-form-item>
                        <el-button type="text" @click="handleQuery" class="gotoseach">搜索</el-button>
                        <span type="text" @click="resetQuery" style="
                                color: #7483a6;
                                font-size: 16px;
                                font-weight: 500;
                                cursor: pointer;
                                marginleft: 20px;
                              ">重置</span>
                    </el-form-item>
                </el-form>
            </div>
            <div class="btnList">
                <el-button @click="addStandar()" class="addStyle">导出</el-button>
                <el-button @click="removeAll()" :disabled="disabledInfo">批量删除</el-button>
            </div>
            <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" max-height="680"
                class="TableStyle">
                <el-table-column show-overflow-tooltip type="selection" width="100" align="center" />
                <el-table-column show-overflow-tooltip label="日志ID" prop="rizhiID" />
                <el-table-column show-overflow-tooltip label="元数据名" prop="yuanshujuming">
                </el-table-column>
                <el-table-column show-overflow-tooltip label="修改类型" prop="xiugaileixing" />
                <el-table-column show-overflow-tooltip label="修改人" prop="xiugairen" />

                <!-- <el-table-column show-overflow-tooltip label="维护时间"  prop="createTime" /> -->
                <el-table-column prop="createTime" label="修改时间" width="160">
                    <template slot-scope="scope">
                        <span>{{ formatTime(scope.row.createTime) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="操作" width="250">
                    <template slot-scope="scope">
                        <!-- 删除 -->
                        <el-tooltip class="item" effect="dark" content="删除" placement="top">
                            <el-button type="text" class="nolockColor" @click="handleDelete(scope.row)">
                                删除
                                <!-- 删除 -->
                                <!-- <span class="iconfont">&#xe74e;</span> -->
                            </el-button>
                        </el-tooltip>
                    </template>
                </el-table-column>
            </el-table>

            <div class="paginationBigbox">
                <div class="paginationbox">
                    <el-pagination @size-change="handleSizeChange" :current-page.sync="queryParams.current"
                        @current-change="handleCurrentChange" :page-size="queryParams.size"
                        layout="total,prev, pager, next" background :total="pageTotal" ref="pagination">
                    </el-pagination>
                </div>
            </div>
        </el-tab-pane>
        </el-tabs>
   



    </div>
</template>
  
<script>
import moment from "moment";
export default {
    name: "logList",
    components: {
    },
    data() {
        return {
            activeName: 'Metadatalog',
            // 总条数
            pageTotal: 12,
            // 遮罩层
            loading: false,
            //批量删除
            disabledInfo: true,
            //搜索条件
            queryParams: {
                catalogueId: "", // 标准集id
                standardId: "", //标准编号
                standardChName: "", //标准中文名
                standardName: "", //标准英文名
                page: 1,
                size: 10,
            },
            //数据
            postList: [
                {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },     {
                    rizhiID: 'L000001',
                    yuanshujuming: '人员信息',
                    xiugaileixing: '基本信息',
                    xiugairen: '修改人1',
                    createTime: '2021-09-14     10:00:00',
                },   
            ]
        };
    },
    mounted() {

    },
    methods: {
        //搜索
        handleQuery() {

        },
        //重置
        resetQuery() {

        },
        // 多选框选中数据
        handleSelectionChange(selection) {
            this.selection = selection;
            if (selection.length > 1) {
                this.disabledInfo = false;
            }
        },
        //数据权限
        dataPartition(val) {
            this.dataPartitionBloon = true;
        },

        //删除
        handleDelete() {
            this.$modal.confirm("是否永久删除？删除后将无法恢复").then(() => {

            });
        },
        //处理时间
        // 时间格式化
        formatTime(time) {
            // return utils.rTime(time);
            return moment(time).format("YYYY-MM-DD HH:mm:ss");
        },
        handleSizeChange(val) {
            this.queryParams.size = val;
        },
        handleCurrentChange(val) {
            this.queryParams.current = val;
        },
        //点击关闭的时候
        handleClose(done) {
            this.$confirm("确认关闭？")
                .then(_ => {
                    done();
                })
                .catch(_ => { });
        },
        //导出
        addStandar() {

        },
        //批量删除
        removeAll() {

        },

    }
};
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/CommonStyle.scss";
.appRightTop{
    padding: 0 20px;
}
.btnList{
    margin-bottom: 20px;
}
</style>
  